
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class TreasureComposeCfg : public ManualSingleton <TreasureComposeCfg>
{
	friend ManualSingleton <TreasureComposeCfg>;
public:
	TreasureComposeCfg();
	~TreasureComposeCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const TreasureComposeCfgInfo *GetTreasureComposeCfgInfo(int32_t id);
	const TreasureComposeCfgMap *GetTreasureComposeCfgMap() { return &m_TreasureComposeCfgMap; }
private:
	TreasureComposeCfgMap m_TreasureComposeCfgMap;
};

#define  g_MakeTreasureComposeCfgTable() (TreasureComposeCfg::Instance())
#define  g_GetTreasureComposeCfgTable() (TreasureComposeCfg::GetInstance())
#define  g_DelTreasureComposeCfgTable() (TreasureComposeCfg::Destroy())